-
Notifications
You must be signed in to change notification settings - Fork 5
Utilize polymorphic_serialization instead of Metaclass to adjust annotations #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
781d7a1 to
31bdbb6
Compare
pyproject.toml
Outdated
| "pandas", | ||
| "pyarrow", | ||
| "pydantic>=2.6,<3", | ||
| "pydantic>=2.35,<3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong version specifier still
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yup, I think that was the pydantic-core version where this came from.
Signed-off-by: Nijat Khanbabayev <[email protected]>
31bdbb6 to
5367fd3
Compare
Signed-off-by: Nijat Khanbabayev <[email protected]>
|
I think this is blocked by this: pydantic/pydantic#12382 Ex a build error. that occured: E pydantic_core._pydantic_core.PydanticSerializationError: Unable to serialize unknown type: <class 'ccflow.tests.test_base_serialize.MyEnum'> Even though MyEnum has a pydantic core schema defined (it's a ccflow enum) Notably, the above issue states: That first recommendation is what we currently do with the MetaClass, and apply the SerializeAsAny annotation to pydantic BaseModels here: https://github.com/Point72/ccflow/blob/main/ccflow/base.py#L117
It seems we can't move off of that until these issues are addressed |
Signed-off-by: Nijat Khanbabayev <[email protected]>
ff8c9e3 to
1ac3bd8
Compare
Signed-off-by: Nijat Khanbabayev <[email protected]>


Utilize the
polymorphic_serializationflag introduced in this PR:pydantic/pydantic#12518